﻿using Framework;
using UnityEngine;
using Logger = Framework.Logger;

public class Boot : MonoBehaviour
{

    public static Boot Instance;

    public ResLoadType loadType = ResLoadType.FromAssetLib;
    
    public void Awake()
    {
        Instance = this;
    }
    
    private void Start()
    {
        Logger.Init();
        Logger.Log("start project !!!");
        ResMgr.Instance.Init(StartLua);
    }

    void StartLua()
    {
        Logger.Log("start lua !!!");
        gameObject.AddComponent<LuaClient>();
        LuaClient.Instance.AddSearchPath(FrameworkSettings.ProjLuaRootDir);
        LuaClient.Instance.StartMain();
    }
    
}